from django.conf.urls import urlfrom rest_framework.routers import DefaultRouterfrom . import viewsurlpatterns = [    # 列表视图    # url(r'^books/$', views.BookListView.as_view()),    # # 详情视图    # url(r'^books/(?P<pk>\d+)/$', views.BookDetailView.as_view()),]# 创建路由器router = DefaultRouter()router.register(r'books', views.BookInfoViewSet)urlpatterns += router.urls# urlpatterns = urlpatterns + router.urls